import request from '@/utils/request'

// 查询车主预约列表
export function listAppointment(query) {
  return request({
    url: '/bysj/appointment/list',
    method: 'get',
    params: query
  })
}

// 查询车主预约详细
export function getAppointment(appointmentId) {
  return request({
    url: '/bysj/appointment/' + appointmentId,
    method: 'get'
  })
}

// 新增车主预约
export function addAppointment(data) {
  return request({
    url: '/bysj/appointment',
    method: 'post',
    data: data
  })
}

// 修改车主预约
export function updateAppointment(data) {
  return request({
    url: '/bysj/appointment',
    method: 'put',
    data: data
  })
}

// 删除车主预约
export function delAppointment(appointmentId) {
  return request({
    url: '/bysj/appointment/' + appointmentId,
    method: 'delete'
  })
}

// 导出车主预约
export function exportAppointment(query) {
  return request({
    url: '/bysj/appointment/export',
    method: 'get',
    params: query
  })
}

// 查询保养管理列表
export function listMaintain(query) {
  return request({
    url: '/bysj/appointment/maintainList',
    method: 'get',
    params: query
  })
}
